<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MQTT C Client Libraries Internals: LinkedList.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MQTT C Client Libraries Internals
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">LinkedList.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>functions which apply to linked list structures.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;LinkedList.h&quot;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &quot;Heap.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for LinkedList.c:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c__incl.png" border="0" usemap="#aLinkedList_8c" alt=""/></div>
<map name="aLinkedList_8c" id="aLinkedList_8c">
<area shape="rect" title="functions which apply to linked list structures." alt="" coords="34,5,127,32"/>
<area shape="rect" title=" " alt="" coords="5,80,68,107"/>
<area shape="rect" title=" " alt="" coords="93,80,157,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab82181e0c1d96954f82dee67cee41296"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296">ListUnlink</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *), int freeContent)</td></tr>
<tr class="memdesc:ab82181e0c1d96954f82dee67cee41296"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and optionally frees an element in a list by comparing the content.  <a href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296">More...</a><br /></td></tr>
<tr class="separator:ab82181e0c1d96954f82dee67cee41296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa254fb1eab8e30d0e03859b333dc22ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed">ListZero</a> (<a class="el" href="structList.html">List</a> *newl)</td></tr>
<tr class="memdesc:aa254fb1eab8e30d0e03859b333dc22ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a list structure to empty - all null values.  <a href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed">More...</a><br /></td></tr>
<tr class="separator:aa254fb1eab8e30d0e03859b333dc22ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e2cccab9752618ead91eafbe2a9a46"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structList.html">List</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a27e2cccab9752618ead91eafbe2a9a46">ListInitialize</a> (void)</td></tr>
<tr class="memdesc:a27e2cccab9752618ead91eafbe2a9a46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates and initializes a new list structure.  <a href="LinkedList_8c.html#a27e2cccab9752618ead91eafbe2a9a46">More...</a><br /></td></tr>
<tr class="separator:a27e2cccab9752618ead91eafbe2a9a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a321a3598d6979c7af3f995b77ea2cec3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3">ListAppendNoMalloc</a> (<a class="el" href="structList.html">List</a> *aList, void *content, <a class="el" href="structListElementStruct.html">ListElement</a> *newel, size_t size)</td></tr>
<tr class="memdesc:a321a3598d6979c7af3f995b77ea2cec3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append an already allocated ListElement and content to a list.  <a href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3">More...</a><br /></td></tr>
<tr class="separator:a321a3598d6979c7af3f995b77ea2cec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc7a28449893dfa775c2f709349968b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4">ListAppend</a> (<a class="el" href="structList.html">List</a> *aList, void *content, size_t size)</td></tr>
<tr class="memdesc:abc7a28449893dfa775c2f709349968b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append an item to a list.  <a href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4">More...</a><br /></td></tr>
<tr class="separator:abc7a28449893dfa775c2f709349968b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabca387fa4b86475bc9e4da40c3977fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#aabca387fa4b86475bc9e4da40c3977fc">ListInsert</a> (<a class="el" href="structList.html">List</a> *aList, void *content, size_t size, <a class="el" href="structListElementStruct.html">ListElement</a> *index)</td></tr>
<tr class="memdesc:aabca387fa4b86475bc9e4da40c3977fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert an item to a list at a specific position.  <a href="LinkedList_8c.html#aabca387fa4b86475bc9e4da40c3977fc">More...</a><br /></td></tr>
<tr class="separator:aabca387fa4b86475bc9e4da40c3977fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ad2879a10b723fb7c1f95c0ad0abdbc50">ListFind</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
<tr class="memdesc:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds an element in a list by comparing the content pointers, rather than the contents.  <a href="LinkedList_8c.html#ad2879a10b723fb7c1f95c0ad0abdbc50">More...</a><br /></td></tr>
<tr class="separator:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acad319e9ce896ff1fff30ddbeb06d22d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d">ListFindItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
<tr class="memdesc:acad319e9ce896ff1fff30ddbeb06d22d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds an element in a list by comparing the content or pointer to the content.  <a href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d">More...</a><br /></td></tr>
<tr class="separator:acad319e9ce896ff1fff30ddbeb06d22d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2bcc1897abf1d98490ea81c474dba52"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab2bcc1897abf1d98490ea81c474dba52">ListDetach</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
<tr class="memdesc:ab2bcc1897abf1d98490ea81c474dba52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes but does not free an item in a list by comparing the pointer to the content.  <a href="LinkedList_8c.html#ab2bcc1897abf1d98490ea81c474dba52">More...</a><br /></td></tr>
<tr class="separator:ab2bcc1897abf1d98490ea81c474dba52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8430370b2b15c56ec95bb8e7e36753a5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5">ListRemove</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
<tr class="memdesc:a8430370b2b15c56ec95bb8e7e36753a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees an item in a list by comparing the pointer to the content.  <a href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5">More...</a><br /></td></tr>
<tr class="separator:a8430370b2b15c56ec95bb8e7e36753a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0f3597d344e09ad6636c8bc72029337"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337">ListDetachHead</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:ab0f3597d344e09ad6636c8bc72029337"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees an the first item in a list.  <a href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337">More...</a><br /></td></tr>
<tr class="separator:ab0f3597d344e09ad6636c8bc72029337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ee7cd1d29fd9299231d40c011174fcd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a5ee7cd1d29fd9299231d40c011174fcd">ListRemoveHead</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:a5ee7cd1d29fd9299231d40c011174fcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees an the first item in a list.  <a href="LinkedList_8c.html#a5ee7cd1d29fd9299231d40c011174fcd">More...</a><br /></td></tr>
<tr class="separator:a5ee7cd1d29fd9299231d40c011174fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a84b0ad14e7cebcd7b9ebab89a8d48321">ListPopTail</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes but does not free the last item in a list.  <a href="LinkedList_8c.html#a84b0ad14e7cebcd7b9ebab89a8d48321">More...</a><br /></td></tr>
<tr class="separator:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ed745f7ba486d16d009e86433fece7b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a9ed745f7ba486d16d009e86433fece7b">ListDetachItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
<tr class="memdesc:a9ed745f7ba486d16d009e86433fece7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes but does not free an element in a list by comparing the content.  <a href="LinkedList_8c.html#a9ed745f7ba486d16d009e86433fece7b">More...</a><br /></td></tr>
<tr class="separator:a9ed745f7ba486d16d009e86433fece7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d">ListRemoveItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
<tr class="memdesc:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees an element in a list by comparing the content.  <a href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d">More...</a><br /></td></tr>
<tr class="separator:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2">ListEmpty</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees all items in a list, leaving the list ready for new items.  <a href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2">More...</a><br /></td></tr>
<tr class="separator:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a276950531b3f54e0dda27d597572c192"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192">ListFree</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:a276950531b3f54e0dda27d597572c192"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and frees all items in a list, and frees the list itself.  <a href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192">More...</a><br /></td></tr>
<tr class="separator:a276950531b3f54e0dda27d597572c192"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a8b3e61bc873a90ad2ea43a15e6c001f4">ListFreeNoContent</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
<tr class="memdesc:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes and but does not free all items in a list, and frees the list itself.  <a href="LinkedList_8c.html#a8b3e61bc873a90ad2ea43a15e6c001f4">More...</a><br /></td></tr>
<tr class="separator:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c6fba7f4b569c69829676bed2852ee9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9">ListNextElement</a> (<a class="el" href="structList.html">List</a> *aList, <a class="el" href="structListElementStruct.html">ListElement</a> **pos)</td></tr>
<tr class="memdesc:a7c6fba7f4b569c69829676bed2852ee9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forward iteration through a list.  <a href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9">More...</a><br /></td></tr>
<tr class="separator:a7c6fba7f4b569c69829676bed2852ee9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a371f4a5021e6aa639bab6ab1457fc1d2">ListPrevElement</a> (<a class="el" href="structList.html">List</a> *aList, <a class="el" href="structListElementStruct.html">ListElement</a> **pos)</td></tr>
<tr class="memdesc:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Backward iteration through a list.  <a href="LinkedList_8c.html#a371f4a5021e6aa639bab6ab1457fc1d2">More...</a><br /></td></tr>
<tr class="separator:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1738915a6d6f10022e9ee1481c0ae452"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452">intcompare</a> (void *a, void *b)</td></tr>
<tr class="memdesc:a1738915a6d6f10022e9ee1481c0ae452"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing integers.  <a href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452">More...</a><br /></td></tr>
<tr class="separator:a1738915a6d6f10022e9ee1481c0ae452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a936806c4b6f6c10d91cc128b63ab110c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a936806c4b6f6c10d91cc128b63ab110c">stringcompare</a> (void *a, void *b)</td></tr>
<tr class="memdesc:a936806c4b6f6c10d91cc128b63ab110c"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing C strings.  <a href="LinkedList_8c.html#a936806c4b6f6c10d91cc128b63ab110c">More...</a><br /></td></tr>
<tr class="separator:a936806c4b6f6c10d91cc128b63ab110c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>functions which apply to linked list structures. </p>
<p>These linked lists can hold data of any sort, pointed to by the content pointer of the ListElement structure. ListElements hold the points to the next and previous items in the list. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a1738915a6d6f10022e9ee1481c0ae452"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1738915a6d6f10022e9ee1481c0ae452">&#9670;&nbsp;</a></span>intcompare()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int intcompare </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing integers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first integer value </td></tr>
    <tr><td class="paramname">b</td><td>second integer value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>

</div>
</div>
<a id="abc7a28449893dfa775c2f709349968b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc7a28449893dfa775c2f709349968b4">&#9670;&nbsp;</a></span>ListAppend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListAppend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Append an item to a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
    <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
    <tr><td class="paramname">size</td><td>the size of the element </td></tr>
  </table>
  </dd>
</dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph.png" border="0" usemap="#aLinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph" alt=""/></div>
<map name="aLinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph" id="aLinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph">
<area shape="rect" title="Append an item to a list." alt="" coords="5,5,93,32"/>
<area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="141,5,284,32"/>
</map>
</div>

</div>
</div>
<a id="a321a3598d6979c7af3f995b77ea2cec3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a321a3598d6979c7af3f995b77ea2cec3">&#9670;&nbsp;</a></span>ListAppendNoMalloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ListAppendNoMalloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td>
          <td class="paramname"><em>newel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Append an already allocated ListElement and content to a list. </p>
<p>Can be used to move an item from one list to another. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
    <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
    <tr><td class="paramname">newel</td><td>the ListElement to be used in adding the new item </td></tr>
    <tr><td class="paramname">size</td><td>the size of the element </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab2bcc1897abf1d98490ea81c474dba52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2bcc1897abf1d98490ea81c474dba52">&#9670;&nbsp;</a></span>ListDetach()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ListDetach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes but does not free an item in a list by comparing the pointer to the content. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph.png" border="0" usemap="#aLinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph" alt=""/></div>
<map name="aLinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph" id="aLinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph">
<area shape="rect" title="Removes but does not free an item in a list by comparing the pointer to the content." alt="" coords="5,5,91,32"/>
<area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="139,5,220,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="268,5,363,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="411,5,529,32"/>
</map>
</div>

</div>
</div>
<a id="ab0f3597d344e09ad6636c8bc72029337"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0f3597d344e09ad6636c8bc72029337">&#9670;&nbsp;</a></span>ListDetachHead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ListDetachHead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees an the first item in a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>

</div>
</div>
<a id="a9ed745f7ba486d16d009e86433fece7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ed745f7ba486d16d009e86433fece7b">&#9670;&nbsp;</a></span>ListDetachItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ListDetachItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(void *, void *)&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes but does not free an element in a list by comparing the content. </p>
<p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
    <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph.png" border="0" usemap="#aLinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph" id="aLinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph">
<area shape="rect" title="Removes but does not free an element in a list by comparing the content." alt="" coords="5,5,116,32"/>
<area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="164,5,245,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="293,5,388,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="436,5,555,32"/>
</map>
</div>

</div>
</div>
<a id="a3cf8578dba23f97dd0411e85fe3b7ff2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cf8578dba23f97dd0411e85fe3b7ff2">&#9670;&nbsp;</a></span>ListEmpty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ListEmpty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees all items in a list, leaving the list ready for new items. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad2879a10b723fb7c1f95c0ad0abdbc50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2879a10b723fb7c1f95c0ad0abdbc50">&#9670;&nbsp;</a></span>ListFind()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListFind </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds an element in a list by comparing the content pointers, rather than the contents. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the list item content itself </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the list item found, or NULL </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph.png" border="0" usemap="#aLinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph" alt=""/></div>
<map name="aLinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph" id="aLinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph">
<area shape="rect" title="Finds an element in a list by comparing the content pointers, rather than the contents." alt="" coords="5,5,75,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="123,5,217,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="265,5,384,32"/>
</map>
</div>

</div>
</div>
<a id="acad319e9ce896ff1fff30ddbeb06d22d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acad319e9ce896ff1fff30ddbeb06d22d">&#9670;&nbsp;</a></span>ListFindItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListFindItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(void *, void *)&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds an element in a list by comparing the content or pointer to the content. </p>
<p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
    <tr><td class="paramname">callback</td><td>pointer to a function which compares each element (NULL means compare by content pointer) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the list element found, or NULL </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph.png" border="0" usemap="#aLinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph" alt=""/></div>
<map name="aLinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph" id="aLinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph">
<area shape="rect" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="5,5,100,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="148,5,267,32"/>
</map>
</div>

</div>
</div>
<a id="a276950531b3f54e0dda27d597572c192"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a276950531b3f54e0dda27d597572c192">&#9670;&nbsp;</a></span>ListFree()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ListFree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees all items in a list, and frees the list itself. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
  </table>
  </dd>
</dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph.png" border="0" usemap="#aLinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph" id="aLinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph">
<area shape="rect" title="Removes and frees all items in a list, and frees the list itself." alt="" coords="5,5,76,32"/>
<area shape="rect" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2" title="Removes and frees all items in a list, leaving the list ready for new items." alt="" coords="124,5,204,32"/>
</map>
</div>

</div>
</div>
<a id="a8b3e61bc873a90ad2ea43a15e6c001f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b3e61bc873a90ad2ea43a15e6c001f4">&#9670;&nbsp;</a></span>ListFreeNoContent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ListFreeNoContent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and but does not free all items in a list, and frees the list itself. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a27e2cccab9752618ead91eafbe2a9a46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27e2cccab9752618ead91eafbe2a9a46">&#9670;&nbsp;</a></span>ListInitialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structList.html">List</a>* ListInitialize </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates and initializes a new list structure. </p>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the new list structure </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph.png" border="0" usemap="#aLinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph" id="aLinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph">
<area shape="rect" title="Allocates and initializes a new list structure." alt="" coords="5,5,96,32"/>
<area shape="rect" href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed" title="Sets a list structure to empty &#45; all null values." alt="" coords="144,5,215,32"/>
</map>
</div>

</div>
</div>
<a id="aabca387fa4b86475bc9e4da40c3977fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabca387fa4b86475bc9e4da40c3977fc">&#9670;&nbsp;</a></span>ListInsert()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListInsert </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> *&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Insert an item to a list at a specific position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
    <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
    <tr><td class="paramname">size</td><td>the size of the element </td></tr>
    <tr><td class="paramname">index</td><td>the position in the list. If NULL, this function is equivalent to ListAppend. </td></tr>
  </table>
  </dd>
</dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph.png" border="0" usemap="#aLinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph" alt=""/></div>
<map name="aLinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph" id="aLinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph">
<area shape="rect" title="Insert an item to a list at a specific position." alt="" coords="5,5,83,32"/>
<area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="131,5,273,32"/>
</map>
</div>

</div>
</div>
<a id="a7c6fba7f4b569c69829676bed2852ee9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c6fba7f4b569c69829676bed2852ee9">&#9670;&nbsp;</a></span>ListNextElement()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListNextElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> **&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Forward iteration through a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
    <tr><td class="paramname">pos</td><td>pointer to the current position in the list. NULL means start from the beginning of the list This is updated on return to the same value as that returned from this function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the current list element </dd></dl>

</div>
</div>
<a id="a84b0ad14e7cebcd7b9ebab89a8d48321"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84b0ad14e7cebcd7b9ebab89a8d48321">&#9670;&nbsp;</a></span>ListPopTail()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ListPopTail </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes but does not free the last item in a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the last item removed (or NULL if none was) </dd></dl>

</div>
</div>
<a id="a371f4a5021e6aa639bab6ab1457fc1d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a371f4a5021e6aa639bab6ab1457fc1d2">&#9670;&nbsp;</a></span>ListPrevElement()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListPrevElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> **&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Backward iteration through a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
    <tr><td class="paramname">pos</td><td>pointer to the current position in the list. NULL means start from the end of the list This is updated on return to the same value as that returned from this function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the current list element </dd></dl>

</div>
</div>
<a id="a8430370b2b15c56ec95bb8e7e36753a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8430370b2b15c56ec95bb8e7e36753a5">&#9670;&nbsp;</a></span>ListRemove()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ListRemove </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees an item in a list by comparing the pointer to the content. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph.png" border="0" usemap="#aLinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph" id="aLinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph">
<area shape="rect" title="Removes and frees an item in a list by comparing the pointer to the content." alt="" coords="5,5,97,32"/>
<area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="145,5,227,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="275,5,369,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="417,5,536,32"/>
</map>
</div>

</div>
</div>
<a id="a5ee7cd1d29fd9299231d40c011174fcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ee7cd1d29fd9299231d40c011174fcd">&#9670;&nbsp;</a></span>ListRemoveHead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ListRemoveHead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees an the first item in a list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph.png" border="0" usemap="#aLinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph" id="aLinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph">
<area shape="rect" title="Removes and frees an the first item in a list." alt="" coords="5,5,128,32"/>
<area shape="rect" href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337" title="Removes and frees an the first item in a list." alt="" coords="176,5,292,32"/>
</map>
</div>

</div>
</div>
<a id="a4bb7c34fe9a5832d65f530091e0fad0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bb7c34fe9a5832d65f530091e0fad0d">&#9670;&nbsp;</a></span>ListRemoveItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ListRemoveItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(void *, void *)&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes and frees an element in a list by comparing the content. </p>
<p>A callback function is used to define the method of comparison for each element </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
    <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph.png" border="0" usemap="#aLinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph" alt=""/></div>
<map name="aLinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph" id="aLinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph">
<area shape="rect" title="Removes and frees an element in a list by comparing the content." alt="" coords="5,5,124,32"/>
<area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="172,5,253,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="301,5,396,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="444,5,563,32"/>
</map>
</div>

</div>
</div>
<a id="ab82181e0c1d96954f82dee67cee41296"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab82181e0c1d96954f82dee67cee41296">&#9670;&nbsp;</a></span>ListUnlink()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int ListUnlink </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>aList</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(void *, void *)&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>freeContent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Removes and optionally frees an element in a list by comparing the content. </p>
<p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
    <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
    <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
    <tr><td class="paramname">freeContent</td><td>boolean value to indicate whether the item found is to be freed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="LinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph.png" border="0" usemap="#aLinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph" alt=""/></div>
<map name="aLinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph" id="aLinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph">
<area shape="rect" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="5,5,87,32"/>
<area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="135,5,229,32"/>
<area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="277,5,396,32"/>
</map>
</div>

</div>
</div>
<a id="aa254fb1eab8e30d0e03859b333dc22ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa254fb1eab8e30d0e03859b333dc22ed">&#9670;&nbsp;</a></span>ListZero()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ListZero </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structList.html">List</a> *&#160;</td>
          <td class="paramname"><em>newl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a list structure to empty - all null values. </p>
<p>Does not remove any items from the list. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newl</td><td>a pointer to the list structure to be initialized </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a936806c4b6f6c10d91cc128b63ab110c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a936806c4b6f6c10d91cc128b63ab110c">&#9670;&nbsp;</a></span>stringcompare()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int stringcompare </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing C strings. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first integer value </td></tr>
    <tr><td class="paramname">b</td><td>second integer value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 13 2023 18:02:53 for MQTT C Client Libraries Internals by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
